Skip to content

Conversation

SuGlider
Copy link
Collaborator

@SuGlider SuGlider commented Sep 16, 2023

Description of Change

Fixes a lack of return value in the uartSetPins() function. It doesn't prevent to build the firmware, but prints a warning message. With this fix, the warning message won't be displayed anymore.

This issue doesn't affect the uartSetPins() function because it only happens in the case that the HAL level is used with a UART number higher than the limit, which is very improbable.

    if(uart_num >= SOC_UART_NUM) {
        log_e("Serial number is invalid, please use numers from 0 to %u", SOC_UART_NUM - 1);
        return false;
    }

Tests scenarios

Just compiling and checking that the warning message is gone.

Related links

Closes #8641

@SuGlider SuGlider added the Peripheral: UART Related to the UART peripheral or its functionality. label Sep 16, 2023
@SuGlider SuGlider added this to the 2.0.13 milestone Sep 16, 2023
@SuGlider SuGlider requested a review from me-no-dev September 16, 2023 20:26
@SuGlider SuGlider self-assigned this Sep 16, 2023
Copy link
Collaborator

@mrengineer7777 mrengineer7777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No other missing return statements in this file.

@VojtechBartoska VojtechBartoska modified the milestones: 2.0.13, 3.0.0 Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Peripheral: UART Related to the UART peripheral or its functionality. Status: Pending Merge Pull Request is ready to be merged
Projects
Development

Successfully merging this pull request may close these issues.

esp32-hal-uart.c:153:9: warning: 'return' with no value, in function returning non-void
5 participants